<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::gpu::StandardGpuResources Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><b>gpu</b></li><li class="navelem"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html">StandardGpuResources</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfaiss_1_1gpu_1_1StandardGpuResources-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::gpu::StandardGpuResources Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="StandardGpuResources_8h_source.html">StandardGpuResources.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::gpu::StandardGpuResources:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classfaiss_1_1gpu_1_1StandardGpuResources.png" usemap="#faiss::gpu::StandardGpuResources_map" alt=""/>
  <map id="faiss::gpu::StandardGpuResources_map" name="faiss::gpu::StandardGpuResources_map">
<area href="classfaiss_1_1gpu_1_1GpuResources.html" alt="faiss::gpu::GpuResources" shape="rect" coords="0,0,205,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6431477a7328ac147797b3b4e3fcf651"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a6431477a7328ac147797b3b4e3fcf651">noTempMemory</a> ()</td></tr>
<tr class="separator:a6431477a7328ac147797b3b4e3fcf651"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a367102e65b16bfdc7a32770a4f5854a6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a367102e65b16bfdc7a32770a4f5854a6">setTempMemory</a> (size_t size)</td></tr>
<tr class="separator:a367102e65b16bfdc7a32770a4f5854a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9acb23ac323f85fa5dab4ed968ccd51"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#af9acb23ac323f85fa5dab4ed968ccd51">setPinnedMemory</a> (size_t size)</td></tr>
<tr class="separator:af9acb23ac323f85fa5dab4ed968ccd51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5924b424c36dba8300866f1b98c438cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5924b424c36dba8300866f1b98c438cb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a5924b424c36dba8300866f1b98c438cb">setDefaultStream</a> (int device, cudaStream_t stream)</td></tr>
<tr class="memdesc:a5924b424c36dba8300866f1b98c438cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called to change the stream for work ordering. <br/></td></tr>
<tr class="separator:a5924b424c36dba8300866f1b98c438cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5374f336f1957c266d7a5c185eb962a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a5374f336f1957c266d7a5c185eb962a1">setDefaultNullStreamAllDevices</a> ()</td></tr>
<tr class="separator:a5374f336f1957c266d7a5c185eb962a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3caad981d50370b9f5c121509eb2ed17"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a3caad981d50370b9f5c121509eb2ed17">setCudaMallocWarning</a> (bool b)</td></tr>
<tr class="separator:a3caad981d50370b9f5c121509eb2ed17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb2729678638ed89f7b8b38470f96056"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#adb2729678638ed89f7b8b38470f96056">initializeForDevice</a> (int device) override</td></tr>
<tr class="memdesc:adb2729678638ed89f7b8b38470f96056"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal system calls.  <a href="#adb2729678638ed89f7b8b38470f96056">More...</a><br/></td></tr>
<tr class="separator:adb2729678638ed89f7b8b38470f96056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7560435c7f45fd59d94ee947330a58da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7560435c7f45fd59d94ee947330a58da"></a>
cublasHandle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a7560435c7f45fd59d94ee947330a58da">getBlasHandle</a> (int device) override</td></tr>
<tr class="memdesc:a7560435c7f45fd59d94ee947330a58da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the cuBLAS handle that we use for the given device. <br/></td></tr>
<tr class="separator:a7560435c7f45fd59d94ee947330a58da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a954f34ef68fd36b8d502ca3a21f7e8a8"><td class="memItemLeft" align="right" valign="top">cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a954f34ef68fd36b8d502ca3a21f7e8a8">getDefaultStream</a> (int device) override</td></tr>
<tr class="separator:a954f34ef68fd36b8d502ca3a21f7e8a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ebf68604864cb890a4c2e3d0a6f9952"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ebf68604864cb890a4c2e3d0a6f9952"></a>
std::vector&lt; cudaStream_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a9ebf68604864cb890a4c2e3d0a6f9952">getAlternateStreams</a> (int device) override</td></tr>
<tr class="memdesc:a9ebf68604864cb890a4c2e3d0a6f9952"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the set of alternative streams that we use for the given device. <br/></td></tr>
<tr class="separator:a9ebf68604864cb890a4c2e3d0a6f9952"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35da92117dd4b47ee773444af716d634"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35da92117dd4b47ee773444af716d634"></a>
<a class="el" href="classfaiss_1_1gpu_1_1DeviceMemory.html">DeviceMemory</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a35da92117dd4b47ee773444af716d634">getMemoryManager</a> (int device) override</td></tr>
<tr class="memdesc:a35da92117dd4b47ee773444af716d634"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the temporary memory manager for the given device. <br/></td></tr>
<tr class="separator:a35da92117dd4b47ee773444af716d634"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7418f127cac2ac663ac0ae2e6f88e8d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7418f127cac2ac663ac0ae2e6f88e8d"></a>
std::pair&lt; void *, size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#ae7418f127cac2ac663ac0ae2e6f88e8d">getPinnedMemory</a> () override</td></tr>
<tr class="memdesc:ae7418f127cac2ac663ac0ae2e6f88e8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the available CPU pinned memory buffer. <br/></td></tr>
<tr class="separator:ae7418f127cac2ac663ac0ae2e6f88e8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf89d4731c826df889f51fe42287b15d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf89d4731c826df889f51fe42287b15d"></a>
cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1StandardGpuResources.html#adf89d4731c826df889f51fe42287b15d">getAsyncCopyStream</a> (int device) override</td></tr>
<tr class="memdesc:adf89d4731c826df889f51fe42287b15d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stream on which we perform async CPU &lt;-&gt; GPU copies. <br/></td></tr>
<tr class="separator:adf89d4731c826df889f51fe42287b15d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classfaiss_1_1gpu_1_1GpuResources')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html">faiss::gpu::GpuResources</a></td></tr>
<tr class="memitem:a00cb7bcbc5f1a00da673f30749149b12 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00cb7bcbc5f1a00da673f30749149b12"></a>
cublasHandle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a00cb7bcbc5f1a00da673f30749149b12">getBlasHandleCurrentDevice</a> ()</td></tr>
<tr class="memdesc:a00cb7bcbc5f1a00da673f30749149b12 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls getBlasHandle with the current device. <br/></td></tr>
<tr class="separator:a00cb7bcbc5f1a00da673f30749149b12 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0354aa570c24e17a9f8a6a45b153ed2 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0354aa570c24e17a9f8a6a45b153ed2"></a>
cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#aa0354aa570c24e17a9f8a6a45b153ed2">getDefaultStreamCurrentDevice</a> ()</td></tr>
<tr class="memdesc:aa0354aa570c24e17a9f8a6a45b153ed2 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls getDefaultStream with the current device. <br/></td></tr>
<tr class="separator:aa0354aa570c24e17a9f8a6a45b153ed2 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a130deab9f6d49cbdde8f9da45ce868fd inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a130deab9f6d49cbdde8f9da45ce868fd">syncDefaultStream</a> (int device)</td></tr>
<tr class="separator:a130deab9f6d49cbdde8f9da45ce868fd inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf6a5653ec2bbb0e9d58a0e1dd73897f inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf6a5653ec2bbb0e9d58a0e1dd73897f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#adf6a5653ec2bbb0e9d58a0e1dd73897f">syncDefaultStreamCurrentDevice</a> ()</td></tr>
<tr class="memdesc:adf6a5653ec2bbb0e9d58a0e1dd73897f inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls syncDefaultStream for the current device. <br/></td></tr>
<tr class="separator:adf6a5653ec2bbb0e9d58a0e1dd73897f inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a622f95597cc2ed2f10f3ae9400dc685b inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a622f95597cc2ed2f10f3ae9400dc685b"></a>
std::vector&lt; cudaStream_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a622f95597cc2ed2f10f3ae9400dc685b">getAlternateStreamsCurrentDevice</a> ()</td></tr>
<tr class="memdesc:a622f95597cc2ed2f10f3ae9400dc685b inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls getAlternateStreams for the current device. <br/></td></tr>
<tr class="separator:a622f95597cc2ed2f10f3ae9400dc685b inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dda2dc3db1bd62cde6657c5cdbfb6e1 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dda2dc3db1bd62cde6657c5cdbfb6e1"></a>
<a class="el" href="classfaiss_1_1gpu_1_1DeviceMemory.html">DeviceMemory</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a1dda2dc3db1bd62cde6657c5cdbfb6e1">getMemoryManagerCurrentDevice</a> ()</td></tr>
<tr class="memdesc:a1dda2dc3db1bd62cde6657c5cdbfb6e1 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls getMemoryManager for the current device. <br/></td></tr>
<tr class="separator:a1dda2dc3db1bd62cde6657c5cdbfb6e1 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefb90d15fade57cdfcff03ec800183d4 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aefb90d15fade57cdfcff03ec800183d4"></a>
cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#aefb90d15fade57cdfcff03ec800183d4">getAsyncCopyStreamCurrentDevice</a> ()</td></tr>
<tr class="memdesc:aefb90d15fade57cdfcff03ec800183d4 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls getAsyncCopyStream for the current device. <br/></td></tr>
<tr class="separator:aefb90d15fade57cdfcff03ec800183d4 inherit pub_methods_classfaiss_1_1gpu_1_1GpuResources"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Default implementation of <a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html">GpuResources</a> that allocates a cuBLAS stream and 2 streams for use, as well as temporary memory </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8h_source.html#l00021">21</a> of file <a class="el" href="StandardGpuResources_8h_source.html">StandardGpuResources.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a954f34ef68fd36b8d502ca3a21f7e8a8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cudaStream_t faiss::gpu::StandardGpuResources::getDefaultStream </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the stream that we order all computation on for the given device </p>

<p>Implements <a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a6c564198df6ba675920c993e2af34b8c">faiss::gpu::GpuResources</a>.</p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00268">268</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="adb2729678638ed89f7b8b38470f96056"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::initializeForDevice </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Internal system calls. </p>
<p>Initialize resources for this device </p>

<p>Implements <a class="el" href="classfaiss_1_1gpu_1_1GpuResources.html#a1f7f4e220ce279257e1daf929c3b0d4e">faiss::gpu::GpuResources</a>.</p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00190">190</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a6431477a7328ac147797b3b4e3fcf651"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::noTempMemory </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable allocation of temporary memory; all temporary memory requests will call cudaMalloc / cudaFree at the point of use </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00115">115</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3caad981d50370b9f5c121509eb2ed17"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::setCudaMallocWarning </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>b</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable or disable the warning about not having enough temporary memory when cudaMalloc gets called </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00174">174</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5374f336f1957c266d7a5c185eb962a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::setDefaultNullStreamAllDevices </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called to change the work ordering streams to the null stream for all devices </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00167">167</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af9acb23ac323f85fa5dab4ed968ccd51"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::setPinnedMemory </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set amount of pinned memory to allocate, for async GPU &lt;-&gt; CPU transfers </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00146">146</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a367102e65b16bfdc7a32770a4f5854a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::gpu::StandardGpuResources::setTempMemory </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specify that we wish to use a certain fixed size of memory on all devices as temporary memory. This is the upper bound for the GPU memory that we will reserve. We will never go above 1.5 GiB on any GPU; smaller GPUs (with &lt;= 4 GiB or &lt;= 8 GiB) will use less memory than that. To avoid any temporary memory allocation, pass 0. </p>

<p>Definition at line <a class="el" href="StandardGpuResources_8cpp_source.html#l00121">121</a> of file <a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/data/users/hoss/faiss/gpu/<a class="el" href="StandardGpuResources_8h_source.html">StandardGpuResources.h</a></li>
<li>/data/users/hoss/faiss/gpu/<a class="el" href="StandardGpuResources_8cpp_source.html">StandardGpuResources.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
